<style>
/* 重写样式 */
.fui-header.block {
    display: block;
}

.fui-tab {
    margin: 0;
}

.fui-tab a {
    height: 2.2rem;
    line-height: 2.2rem;
}

.fui-tab:after {
    display: none;
}
.nickname {
    color: #50b6fe;
}
    .shop-index-page .menu {height: auto; background: #fff;}
    .shop-index-page .menu .item {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; font-size: 0.7rem; color: #636363; text-align: center; display: table-cell;position: relative;}
    .shop-index-page .menu .item:after  {font-size: 0.7rem;position: absolute;content: '';left:-1px;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
    .content-empty{padding:1rem 0;margin:0;}
source{
    min-width: 100%;
    min-height: 100%;
    height: auto;
    width: auto;
}
</style>

<div ng-if="pagedata.op=='main'" class="fui-page shop-index-page" style="display:block;">
    <div class="fui-header">
        <div class="fui-header-left">
            <!--<a class="back"></a>-->
        </div>
		<div class="title">
        <div class="fui-searchbar bar">
			<div ng-class="{'searchbar center':1,'searchbar-active':pagedata.searchbar ==1}">
						<input id="searchsub" type="button" ng-click="access(pagedata.op,made_query(pagedata.params))"  value="搜索" class="searchbar-cancel searchbtn">
						<div class="search-input" ng-click="pagedata.searchbar =1">
							<input type="search" placeholder="搜索课程名称..." class="search" ng-model="pagedata.params.keyword">
						</div>
			</div>
		</div>
		</div>
        <div class="fui-header-right"></div>
    </div>
    <div class="fui-content" style="padding-bottom:4rem">
		<div style="padding:0">
		<div class="fui-list-group" style="margin-top:0">
		<div ng-repeat="item in pagedata.list" class="fui-list">
			<div class="fui-list-media">
				<img ng-src="{{tomedia(item.thumb) ||'../core/resource/images/nopic.jpg'}}" class="round">
			</div>
			<div class="fui-list-inner" ng-click="access_json('jy_onlineedu/video_detail//id='+item.video_id)">
				<div class="row">
				      <div class="row-text" >
					 {{item.title}}
				      </div>
				</div>
				<div class="subtitle">
				    <span><i class="icon icon-paihao0"></i> {{item.likenum || 0}}人</span><span style="margin-left:0.5rem">{{item.updatetimetitle}}</span>
				</div>
			</div>
		</div>
		</div>
		<div ng-if="!pagedata.loading && (!pagedata.list || pagedata.list.length<1)" class='content-empty' style="margin-top:0">
			<i class='icon icon-sousuo1'></i><br/>暂时没有任何课程
		</div>
		<div ng-if="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.setshowewm=function(item){
	scope.post_json('/index/looklog/id='+item.id,{},function(res){
		if(res=='success'){
			
		}
	});
}
/*var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
if (browserRule.test(navigator.userAgent)) {
        window.onpageshow = function(event) {
            if (event.persisted) {
                window.location.reload()
            }
        };
}*/
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
});
//信息弹窗：
//前端先注册以等待接收消息
require(['jinyun_socket'],function(jinyun_socket){
    jinyun_socket.connect();
    jinyun_socket.onsystem=function(res){
        if(res.message){
			var success_title = '确认';
			if(res.url){
				success_title = '前往查看';
			}
			scope.confirm({
						'message':res.message,
						'success':res.url,
						'success_title':success_title
			});
		}
    }
});
//滚动加载
scope.tool.get_list('jy_onlineedu/mybuy/getlist/keyword='+scope.pagedata.params.keyword,true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_onlineedu/mybuy/getlist/keyword='+scope.pagedata.params.keyword);
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>